package com.ngovanhau.justsort;

import com.ngovanhau.justsort.sound.MusicBackground;
import com.ngovanhau.justsort.util.UtilFont;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.View;
import android.widget.TextView;

public class GameOverActivity extends Activity {

	TextView line1, line3;
//	public MusicBackground music;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_game_over);
		
		line1 = (TextView) findViewById(R.id.over_congras);
		line3 = (TextView) findViewById(R.id.over_question);
		
		line1.setTypeface(UtilFont.getFont());
		line3.setTypeface(UtilFont.getFont());
//		music.pause();
		MainMenuActivity.sound.playGameOver();
	}
	
	public void onClick(View view){
		if(view.getId() == R.id.btn_gameover_next){
			Intent intent = new Intent(this, MainGameActivity.class);
			startActivity(intent);
			this.finish();
		}else if(view.getId() == R.id.btn_gameover_back){
			MainMenuActivity.sound.playClickButton();
			this.finish();
		}
	}
}
